import request from '@/utils/request'

// 查询预警指标列表
export function listIndicator(query) {
  return request({
    url: '/yanjing/indicator/list',
    method: 'get',
    params: query
  })
}

// 查询预警指标详细
export function getIndicator(id) {
  return request({
    url: '/yanjing/indicator/' + id,
    method: 'get'
  })
}

// 新增预警指标
export function addIndicator(data) {
  return request({
    url: '/yanjing/indicator',
    method: 'post',
    data: data
  })
}

// 修改预警指标
export function updateIndicator(data) {
  return request({
    url: '/yanjing/indicator',
    method: 'put',
    data: data
  })
}

// 删除预警指标
export function delIndicator(id) {
  return request({
    url: '/yanjing/indicator/' + id,
    method: 'delete'
  })
}
